.class public Lcom/vividsolutions/jts/operation/relate/RelateComputer;
.super Ljava/lang/Object;
.source "RelateComputer.java"


# instance fields
.field private arg:[Lcom/vividsolutions/jts/geomgraph/GeometryGraph;

.field private im:Lcom/vividsolutions/jts/geom/IntersectionMatrix;

.field private isolatedEdges:Ljava/util/ArrayList;

.field private li:Lcom/vividsolutions/jts/algorithm/LineIntersector;

.field private nodes:Lcom/vividsolutions/jts/geomgraph/NodeMap;

.field private ptLocator:Lcom/vividsolutions/jts/algorithm/PointLocator;


# direct methods
.method public constructor <init>([Lcom/vividsolutions/jts/geomgraph/GeometryGraph;)V
    .locals 2

    .line 76
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 65
    new-instance v0, Lcom/vividsolutions/jts/algorithm/RobustLineIntersector;

    invoke-direct {v0}, Lcom/vividsolutions/jts/algorithm/RobustLineIntersector;-><init>()V

    iput-object v0, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->li:Lcom/vividsolutions/jts/algorithm/LineIntersector;

    .line 66
    new-instance v0, Lcom/vividsolutions/jts/algorithm/PointLocator;

    invoke-direct {v0}, Lcom/vividsolutions/jts/algorithm/PointLocator;-><init>()V

    iput-object v0, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->ptLocator:Lcom/vividsolutions/jts/algorithm/PointLocator;

    .line 68
    new-instance v0, Lcom/vividsolutions/jts/geomgraph/NodeMap;

    new-instance v1, Lcom/vividsolutions/jts/operation/relate/RelateNodeFactory;

    invoke-direct {v1}, Lcom/vividsolutions/jts/operation/relate/RelateNodeFactory;-><init>()V

    invoke-direct {v0, v1}, Lcom/vividsolutions/jts/geomgraph/NodeMap;-><init>(Lcom/vividsolutions/jts/geomgraph/NodeFactory;)V

    iput-object v0, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->nodes:Lcom/vividsolutions/jts/geomgraph/NodeMap;

    const/4 v0, 0x0

    .line 70
    iput-object v0, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->im:Lcom/vividsolutions/jts/geom/IntersectionMatrix;

    .line 71
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->isolatedEdges:Ljava/util/ArrayList;

    .line 77
    iput-object p1, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->arg:[Lcom/vividsolutions/jts/geomgraph/GeometryGraph;

    return-void
.end method

.method private computeDisjointIM(Lcom/vividsolutions/jts/geom/IntersectionMatrix;)V
    .locals 5

    .line 281
    iget-object v0, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->arg:[Lcom/vividsolutions/jts/geomgraph/GeometryGraph;

    const/4 v1, 0x0

    aget-object v0, v0, v1

    invoke-virtual {v0}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->getGeometry()Lcom/vividsolutions/jts/geom/Geometry;

    move-result-object v0

    .line 282
    invoke-virtual {v0}, Lcom/vividsolutions/jts/geom/Geometry;->isEmpty()Z

    move-result v2

    const/4 v3, 0x1

    const/4 v4, 0x2

    if-nez v2, :cond_0

    .line 283
    invoke-virtual {v0}, Lcom/vividsolutions/jts/geom/Geometry;->getDimension()I

    move-result v2

    invoke-virtual {p1, v1, v4, v2}, Lcom/vividsolutions/jts/geom/IntersectionMatrix;->set(III)V

    .line 284
    invoke-virtual {v0}, Lcom/vividsolutions/jts/geom/Geometry;->getBoundaryDimension()I

    move-result v0

    invoke-virtual {p1, v3, v4, v0}, Lcom/vividsolutions/jts/geom/IntersectionMatrix;->set(III)V

    .line 286
    :cond_0
    iget-object v0, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->arg:[Lcom/vividsolutions/jts/geomgraph/GeometryGraph;

    aget-object v0, v0, v3

    invoke-virtual {v0}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->getGeometry()Lcom/vividsolutions/jts/geom/Geometry;

    move-result-object v0

    .line 287
    invoke-virtual {v0}, Lcom/vividsolutions/jts/geom/Geometry;->isEmpty()Z

    move-result v2

    if-nez v2, :cond_1

    .line 288
    invoke-virtual {v0}, Lcom/vividsolutions/jts/geom/Geometry;->getDimension()I

    move-result v2

    invoke-virtual {p1, v4, v1, v2}, Lcom/vividsolutions/jts/geom/IntersectionMatrix;->set(III)V

    .line 289
    invoke-virtual {v0}, Lcom/vividsolutions/jts/geom/Geometry;->getBoundaryDimension()I

    move-result v0

    invoke-virtual {p1, v4, v3, v0}, Lcom/vividsolutions/jts/geom/IntersectionMatrix;->set(III)V

    :cond_1
    return-void
.end method

.method private computeIntersectionNodes(I)V
    .locals 5

    .line 234
    iget-object v0, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->arg:[Lcom/vividsolutions/jts/geomgraph/GeometryGraph;

    aget-object v0, v0, p1

    invoke-virtual {v0}, Lcom/vividsolutions/jts/geomgraph/PlanarGraph;->getEdgeIterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_3

    .line 235
    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/vividsolutions/jts/geomgraph/Edge;

    .line 236
    invoke-virtual {v1}, Lcom/vividsolutions/jts/geomgraph/GraphComponent;->getLabel()Lcom/vividsolutions/jts/geomgraph/Label;

    move-result-object v2

    invoke-virtual {v2, p1}, Lcom/vividsolutions/jts/geomgraph/Label;->getLocation(I)I

    move-result v2

    .line 237
    invoke-virtual {v1}, Lcom/vividsolutions/jts/geomgraph/Edge;->getEdgeIntersectionList()Lcom/vividsolutions/jts/geomgraph/EdgeIntersectionList;

    move-result-object v1

    invoke-virtual {v1}, Lcom/vividsolutions/jts/geomgraph/EdgeIntersectionList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :cond_1
    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_0

    .line 238
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;

    .line 239
    iget-object v4, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->nodes:Lcom/vividsolutions/jts/geomgraph/NodeMap;

    iget-object v3, v3, Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;->coord:Lcom/vividsolutions/jts/geom/Coordinate;

    invoke-virtual {v4, v3}, Lcom/vividsolutions/jts/geomgraph/NodeMap;->addNode(Lcom/vividsolutions/jts/geom/Coordinate;)Lcom/vividsolutions/jts/geomgraph/Node;

    move-result-object v3

    check-cast v3, Lcom/vividsolutions/jts/operation/relate/RelateNode;

    const/4 v4, 0x1

    if-ne v2, v4, :cond_2

    .line 241
    invoke-virtual {v3, p1}, Lcom/vividsolutions/jts/geomgraph/Node;->setLabelBoundary(I)V

    goto :goto_0

    .line 243
    :cond_2
    invoke-virtual {v3}, Lcom/vividsolutions/jts/geomgraph/GraphComponent;->getLabel()Lcom/vividsolutions/jts/geomgraph/Label;

    move-result-object v4

    invoke-virtual {v4, p1}, Lcom/vividsolutions/jts/geomgraph/Label;->isNull(I)Z

    move-result v4

    if-eqz v4, :cond_1

    const/4 v4, 0x0

    .line 244
    invoke-virtual {v3, p1, v4}, Lcom/vividsolutions/jts/geomgraph/Node;->setLabel(II)V

    goto :goto_0

    :cond_3
    return-void
.end method

.method private computeProperIntersectionIM(Lcom/vividsolutions/jts/geomgraph/index/SegmentIntersector;Lcom/vividsolutions/jts/geom/IntersectionMatrix;)V
    .locals 5

    .line 164
    iget-object v0, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->arg:[Lcom/vividsolutions/jts/geomgraph/GeometryGraph;

    const/4 v1, 0x0

    aget-object v0, v0, v1

    invoke-virtual {v0}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->getGeometry()Lcom/vividsolutions/jts/geom/Geometry;

    move-result-object v0

    invoke-virtual {v0}, Lcom/vividsolutions/jts/geom/Geometry;->getDimension()I

    move-result v0

    .line 165
    iget-object v1, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->arg:[Lcom/vividsolutions/jts/geomgraph/GeometryGraph;

    const/4 v2, 0x1

    aget-object v1, v1, v2

    invoke-virtual {v1}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->getGeometry()Lcom/vividsolutions/jts/geom/Geometry;

    move-result-object v1

    invoke-virtual {v1}, Lcom/vividsolutions/jts/geom/Geometry;->getDimension()I

    move-result v1

    .line 166
    invoke-virtual {p1}, Lcom/vividsolutions/jts/geomgraph/index/SegmentIntersector;->hasProperIntersection()Z

    move-result v3

    .line 167
    invoke-virtual {p1}, Lcom/vividsolutions/jts/geomgraph/index/SegmentIntersector;->hasProperInteriorIntersection()Z

    move-result p1

    const/4 v4, 0x2

    if-ne v0, v4, :cond_0

    if-ne v1, v4, :cond_0

    if-eqz v3, :cond_5

    const-string p1, "212101212"

    .line 175
    invoke-virtual {p2, p1}, Lcom/vividsolutions/jts/geom/IntersectionMatrix;->setAtLeast(Ljava/lang/String;)V

    goto :goto_0

    :cond_0
    if-ne v0, v4, :cond_2

    if-ne v1, v2, :cond_2

    if-eqz v3, :cond_1

    const-string v0, "FFF0FFFF2"

    .line 186
    invoke-virtual {p2, v0}, Lcom/vividsolutions/jts/geom/IntersectionMatrix;->setAtLeast(Ljava/lang/String;)V

    :cond_1
    if-eqz p1, :cond_5

    const-string p1, "1FFFFF1FF"

    .line 187
    invoke-virtual {p2, p1}, Lcom/vividsolutions/jts/geom/IntersectionMatrix;->setAtLeast(Ljava/lang/String;)V

    goto :goto_0

    :cond_2
    if-ne v0, v2, :cond_4

    if-ne v1, v4, :cond_4

    if-eqz v3, :cond_3

    const-string v0, "F0FFFFFF2"

    .line 190
    invoke-virtual {p2, v0}, Lcom/vividsolutions/jts/geom/IntersectionMatrix;->setAtLeast(Ljava/lang/String;)V

    :cond_3
    if-eqz p1, :cond_5

    const-string p1, "1F1FFFFFF"

    .line 191
    invoke-virtual {p2, p1}, Lcom/vividsolutions/jts/geom/IntersectionMatrix;->setAtLeast(Ljava/lang/String;)V

    goto :goto_0

    :cond_4
    if-ne v0, v2, :cond_5

    if-ne v1, v2, :cond_5

    if-eqz p1, :cond_5

    const-string p1, "0FFFFFFFF"

    .line 203
    invoke-virtual {p2, p1}, Lcom/vividsolutions/jts/geom/IntersectionMatrix;->setAtLeast(Ljava/lang/String;)V

    :cond_5
    :goto_0
    return-void
.end method

.method private copyNodesAndLabels(I)V
    .locals 4

    .line 218
    iget-object v0, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->arg:[Lcom/vividsolutions/jts/geomgraph/GeometryGraph;

    aget-object v0, v0, p1

    invoke-virtual {v0}, Lcom/vividsolutions/jts/geomgraph/PlanarGraph;->getNodeIterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 219
    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/vividsolutions/jts/geomgraph/Node;

    .line 220
    iget-object v2, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->nodes:Lcom/vividsolutions/jts/geomgraph/NodeMap;

    invoke-virtual {v1}, Lcom/vividsolutions/jts/geomgraph/Node;->getCoordinate()Lcom/vividsolutions/jts/geom/Coordinate;

    move-result-object v3

    invoke-virtual {v2, v3}, Lcom/vividsolutions/jts/geomgraph/NodeMap;->addNode(Lcom/vividsolutions/jts/geom/Coordinate;)Lcom/vividsolutions/jts/geomgraph/Node;

    move-result-object v2

    .line 221
    invoke-virtual {v1}, Lcom/vividsolutions/jts/geomgraph/GraphComponent;->getLabel()Lcom/vividsolutions/jts/geomgraph/Label;

    move-result-object v1

    invoke-virtual {v1, p1}, Lcom/vividsolutions/jts/geomgraph/Label;->getLocation(I)I

    move-result v1

    invoke-virtual {v2, p1, v1}, Lcom/vividsolutions/jts/geomgraph/Node;->setLabel(II)V

    goto :goto_0

    :cond_0
    return-void
.end method

.method private insertEdgeEnds(Ljava/util/List;)V
    .locals 2

    .line 155
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 156
    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/vividsolutions/jts/geomgraph/EdgeEnd;

    .line 157
    iget-object v1, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->nodes:Lcom/vividsolutions/jts/geomgraph/NodeMap;

    invoke-virtual {v1, v0}, Lcom/vividsolutions/jts/geomgraph/NodeMap;->add(Lcom/vividsolutions/jts/geomgraph/EdgeEnd;)V

    goto :goto_0

    :cond_0
    return-void
.end method

.method private labelIsolatedEdge(Lcom/vividsolutions/jts/geomgraph/Edge;ILcom/vividsolutions/jts/geom/Geometry;)V
    .locals 2

    .line 349
    invoke-virtual {p3}, Lcom/vividsolutions/jts/geom/Geometry;->getDimension()I

    move-result v0

    if-lez v0, :cond_0

    .line 353
    iget-object v0, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->ptLocator:Lcom/vividsolutions/jts/algorithm/PointLocator;

    invoke-virtual {p1}, Lcom/vividsolutions/jts/geomgraph/Edge;->getCoordinate()Lcom/vividsolutions/jts/geom/Coordinate;

    move-result-object v1

    invoke-virtual {v0, v1, p3}, Lcom/vividsolutions/jts/algorithm/PointLocator;->locate(Lcom/vividsolutions/jts/geom/Coordinate;Lcom/vividsolutions/jts/geom/Geometry;)I

    move-result p3

    .line 354
    invoke-virtual {p1}, Lcom/vividsolutions/jts/geomgraph/GraphComponent;->getLabel()Lcom/vividsolutions/jts/geomgraph/Label;

    move-result-object p1

    invoke-virtual {p1, p2, p3}, Lcom/vividsolutions/jts/geomgraph/Label;->setAllLocations(II)V

    goto :goto_0

    .line 357
    :cond_0
    invoke-virtual {p1}, Lcom/vividsolutions/jts/geomgraph/GraphComponent;->getLabel()Lcom/vividsolutions/jts/geomgraph/Label;

    move-result-object p1

    const/4 p3, 0x2

    invoke-virtual {p1, p2, p3}, Lcom/vividsolutions/jts/geomgraph/Label;->setAllLocations(II)V

    :goto_0
    return-void
.end method

.method private labelIsolatedEdges(II)V
    .locals 2

    .line 333
    iget-object v0, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->arg:[Lcom/vividsolutions/jts/geomgraph/GeometryGraph;

    aget-object p1, v0, p1

    invoke-virtual {p1}, Lcom/vividsolutions/jts/geomgraph/PlanarGraph;->getEdgeIterator()Ljava/util/Iterator;

    move-result-object p1

    :cond_0
    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 334
    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/vividsolutions/jts/geomgraph/Edge;

    .line 335
    invoke-virtual {v0}, Lcom/vividsolutions/jts/geomgraph/Edge;->isIsolated()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 336
    iget-object v1, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->arg:[Lcom/vividsolutions/jts/geomgraph/GeometryGraph;

    aget-object v1, v1, p2

    invoke-virtual {v1}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->getGeometry()Lcom/vividsolutions/jts/geom/Geometry;

    move-result-object v1

    invoke-direct {p0, v0, p2, v1}, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->labelIsolatedEdge(Lcom/vividsolutions/jts/geomgraph/Edge;ILcom/vividsolutions/jts/geom/Geometry;)V

    .line 337
    iget-object v1, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->isolatedEdges:Ljava/util/ArrayList;

    invoke-virtual {v1, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_0

    :cond_1
    return-void
.end method

.method private labelIsolatedNode(Lcom/vividsolutions/jts/geomgraph/Node;I)V
    .locals 3

    .line 392
    iget-object v0, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->ptLocator:Lcom/vividsolutions/jts/algorithm/PointLocator;

    invoke-virtual {p1}, Lcom/vividsolutions/jts/geomgraph/Node;->getCoordinate()Lcom/vividsolutions/jts/geom/Coordinate;

    move-result-object v1

    iget-object v2, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->arg:[Lcom/vividsolutions/jts/geomgraph/GeometryGraph;

    aget-object v2, v2, p2

    invoke-virtual {v2}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->getGeometry()Lcom/vividsolutions/jts/geom/Geometry;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lcom/vividsolutions/jts/algorithm/PointLocator;->locate(Lcom/vividsolutions/jts/geom/Coordinate;Lcom/vividsolutions/jts/geom/Geometry;)I

    move-result v0

    .line 393
    invoke-virtual {p1}, Lcom/vividsolutions/jts/geomgraph/GraphComponent;->getLabel()Lcom/vividsolutions/jts/geomgraph/Label;

    move-result-object p1

    invoke-virtual {p1, p2, v0}, Lcom/vividsolutions/jts/geomgraph/Label;->setAllLocations(II)V

    return-void
.end method

.method private labelIsolatedNodes()V
    .locals 7

    .line 373
    iget-object v0, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->nodes:Lcom/vividsolutions/jts/geomgraph/NodeMap;

    invoke-virtual {v0}, Lcom/vividsolutions/jts/geomgraph/NodeMap;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_0
    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_3

    .line 374
    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/vividsolutions/jts/geomgraph/Node;

    .line 375
    invoke-virtual {v1}, Lcom/vividsolutions/jts/geomgraph/GraphComponent;->getLabel()Lcom/vividsolutions/jts/geomgraph/Label;

    move-result-object v2

    .line 377
    invoke-virtual {v2}, Lcom/vividsolutions/jts/geomgraph/Label;->getGeometryCount()I

    move-result v3

    const/4 v4, 0x1

    const/4 v5, 0x0

    if-lez v3, :cond_1

    const/4 v3, 0x1

    goto :goto_1

    :cond_1
    const/4 v3, 0x0

    :goto_1
    const-string v6, "node with empty label found"

    invoke-static {v3, v6}, Lcom/vividsolutions/jts/util/Assert;->isTrue(ZLjava/lang/String;)V

    .line 378
    invoke-virtual {v1}, Lcom/vividsolutions/jts/geomgraph/Node;->isIsolated()Z

    move-result v3

    if-eqz v3, :cond_0

    .line 379
    invoke-virtual {v2, v5}, Lcom/vividsolutions/jts/geomgraph/Label;->isNull(I)Z

    move-result v2

    if-eqz v2, :cond_2

    .line 380
    invoke-direct {p0, v1, v5}, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->labelIsolatedNode(Lcom/vividsolutions/jts/geomgraph/Node;I)V

    goto :goto_0

    .line 382
    :cond_2
    invoke-direct {p0, v1, v4}, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->labelIsolatedNode(Lcom/vividsolutions/jts/geomgraph/Node;I)V

    goto :goto_0

    :cond_3
    return-void
.end method

.method private labelNodeEdges()V
    .locals 3

    .line 295
    iget-object v0, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->nodes:Lcom/vividsolutions/jts/geomgraph/NodeMap;

    invoke-virtual {v0}, Lcom/vividsolutions/jts/geomgraph/NodeMap;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 296
    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/vividsolutions/jts/operation/relate/RelateNode;

    .line 297
    invoke-virtual {v1}, Lcom/vividsolutions/jts/geomgraph/Node;->getEdges()Lcom/vividsolutions/jts/geomgraph/EdgeEndStar;

    move-result-object v1

    iget-object v2, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->arg:[Lcom/vividsolutions/jts/geomgraph/GeometryGraph;

    invoke-virtual {v1, v2}, Lcom/vividsolutions/jts/geomgraph/EdgeEndStar;->computeLabelling([Lcom/vividsolutions/jts/geomgraph/GeometryGraph;)V

    goto :goto_0

    :cond_0
    return-void
.end method

.method private updateIM(Lcom/vividsolutions/jts/geom/IntersectionMatrix;)V
    .locals 2

    .line 309
    iget-object v0, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->isolatedEdges:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 310
    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/vividsolutions/jts/geomgraph/Edge;

    .line 311
    invoke-virtual {v1, p1}, Lcom/vividsolutions/jts/geomgraph/GraphComponent;->updateIM(Lcom/vividsolutions/jts/geom/IntersectionMatrix;)V

    goto :goto_0

    .line 314
    :cond_0
    iget-object v0, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->nodes:Lcom/vividsolutions/jts/geomgraph/NodeMap;

    invoke-virtual {v0}, Lcom/vividsolutions/jts/geomgraph/NodeMap;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_1
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_1

    .line 315
    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/vividsolutions/jts/operation/relate/RelateNode;

    .line 316
    invoke-virtual {v1, p1}, Lcom/vividsolutions/jts/geomgraph/GraphComponent;->updateIM(Lcom/vividsolutions/jts/geom/IntersectionMatrix;)V

    .line 318
    invoke-virtual {v1, p1}, Lcom/vividsolutions/jts/operation/relate/RelateNode;->updateIMFromEdges(Lcom/vividsolutions/jts/geom/IntersectionMatrix;)V

    goto :goto_1

    :cond_1
    return-void
.end method


# virtual methods
.method public computeIM()Lcom/vividsolutions/jts/geom/IntersectionMatrix;
    .locals 6

    .line 82
    new-instance v0, Lcom/vividsolutions/jts/geom/IntersectionMatrix;

    invoke-direct {v0}, Lcom/vividsolutions/jts/geom/IntersectionMatrix;-><init>()V

    const/4 v1, 0x2

    .line 84
    invoke-virtual {v0, v1, v1, v1}, Lcom/vividsolutions/jts/geom/IntersectionMatrix;->set(III)V

    .line 87
    iget-object v1, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->arg:[Lcom/vividsolutions/jts/geomgraph/GeometryGraph;

    const/4 v2, 0x0

    aget-object v1, v1, v2

    invoke-virtual {v1}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->getGeometry()Lcom/vividsolutions/jts/geom/Geometry;

    move-result-object v1

    invoke-virtual {v1}, Lcom/vividsolutions/jts/geom/Geometry;->getEnvelopeInternal()Lcom/vividsolutions/jts/geom/Envelope;

    move-result-object v1

    iget-object v3, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->arg:[Lcom/vividsolutions/jts/geomgraph/GeometryGraph;

    const/4 v4, 0x1

    aget-object v3, v3, v4

    invoke-virtual {v3}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->getGeometry()Lcom/vividsolutions/jts/geom/Geometry;

    move-result-object v3

    invoke-virtual {v3}, Lcom/vividsolutions/jts/geom/Geometry;->getEnvelopeInternal()Lcom/vividsolutions/jts/geom/Envelope;

    move-result-object v3

    invoke-virtual {v1, v3}, Lcom/vividsolutions/jts/geom/Envelope;->intersects(Lcom/vividsolutions/jts/geom/Envelope;)Z

    move-result v1

    if-nez v1, :cond_0

    .line 89
    invoke-direct {p0, v0}, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->computeDisjointIM(Lcom/vividsolutions/jts/geom/IntersectionMatrix;)V

    return-object v0

    .line 92
    :cond_0
    iget-object v1, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->arg:[Lcom/vividsolutions/jts/geomgraph/GeometryGraph;

    aget-object v1, v1, v2

    iget-object v3, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->li:Lcom/vividsolutions/jts/algorithm/LineIntersector;

    invoke-virtual {v1, v3, v2}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->computeSelfNodes(Lcom/vividsolutions/jts/algorithm/LineIntersector;Z)Lcom/vividsolutions/jts/geomgraph/index/SegmentIntersector;

    .line 93
    iget-object v1, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->arg:[Lcom/vividsolutions/jts/geomgraph/GeometryGraph;

    aget-object v1, v1, v4

    iget-object v3, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->li:Lcom/vividsolutions/jts/algorithm/LineIntersector;

    invoke-virtual {v1, v3, v2}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->computeSelfNodes(Lcom/vividsolutions/jts/algorithm/LineIntersector;Z)Lcom/vividsolutions/jts/geomgraph/index/SegmentIntersector;

    .line 96
    iget-object v1, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->arg:[Lcom/vividsolutions/jts/geomgraph/GeometryGraph;

    aget-object v3, v1, v2

    aget-object v1, v1, v4

    iget-object v5, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->li:Lcom/vividsolutions/jts/algorithm/LineIntersector;

    invoke-virtual {v3, v1, v5, v2}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->computeEdgeIntersections(Lcom/vividsolutions/jts/geomgraph/GeometryGraph;Lcom/vividsolutions/jts/algorithm/LineIntersector;Z)Lcom/vividsolutions/jts/geomgraph/index/SegmentIntersector;

    move-result-object v1

    .line 98
    invoke-direct {p0, v2}, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->computeIntersectionNodes(I)V

    .line 99
    invoke-direct {p0, v4}, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->computeIntersectionNodes(I)V

    .line 104
    invoke-direct {p0, v2}, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->copyNodesAndLabels(I)V

    .line 105
    invoke-direct {p0, v4}, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->copyNodesAndLabels(I)V

    .line 110
    invoke-direct {p0}, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->labelIsolatedNodes()V

    .line 114
    invoke-direct {p0, v1, v0}, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->computeProperIntersectionIM(Lcom/vividsolutions/jts/geomgraph/index/SegmentIntersector;Lcom/vividsolutions/jts/geom/IntersectionMatrix;)V

    .line 123
    new-instance v1, Lcom/vividsolutions/jts/operation/relate/EdgeEndBuilder;

    invoke-direct {v1}, Lcom/vividsolutions/jts/operation/relate/EdgeEndBuilder;-><init>()V

    .line 124
    iget-object v3, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->arg:[Lcom/vividsolutions/jts/geomgraph/GeometryGraph;

    aget-object v3, v3, v2

    invoke-virtual {v3}, Lcom/vividsolutions/jts/geomgraph/PlanarGraph;->getEdgeIterator()Ljava/util/Iterator;

    move-result-object v3

    invoke-virtual {v1, v3}, Lcom/vividsolutions/jts/operation/relate/EdgeEndBuilder;->computeEdgeEnds(Ljava/util/Iterator;)Ljava/util/List;

    move-result-object v3

    .line 125
    invoke-direct {p0, v3}, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->insertEdgeEnds(Ljava/util/List;)V

    .line 126
    iget-object v3, p0, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->arg:[Lcom/vividsolutions/jts/geomgraph/GeometryGraph;

    aget-object v3, v3, v4

    invoke-virtual {v3}, Lcom/vividsolutions/jts/geomgraph/PlanarGraph;->getEdgeIterator()Ljava/util/Iterator;

    move-result-object v3

    invoke-virtual {v1, v3}, Lcom/vividsolutions/jts/operation/relate/EdgeEndBuilder;->computeEdgeEnds(Ljava/util/Iterator;)Ljava/util/List;

    move-result-object v1

    .line 127
    invoke-direct {p0, v1}, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->insertEdgeEnds(Ljava/util/List;)V

    .line 132
    invoke-direct {p0}, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->labelNodeEdges()V

    .line 144
    invoke-direct {p0, v2, v4}, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->labelIsolatedEdges(II)V

    .line 146
    invoke-direct {p0, v4, v2}, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->labelIsolatedEdges(II)V

    .line 149
    invoke-direct {p0, v0}, Lcom/vividsolutions/jts/operation/relate/RelateComputer;->updateIM(Lcom/vividsolutions/jts/geom/IntersectionMatrix;)V

    return-object v0
.end method
